getto (2) --- get to the last file in a pathname 08/28/84 | _C_a_l_l_i_n_g _I_n_f_o_r_m_a_t_i_o_n integer function getto (path, name, pwd, attach) character path (ARB) | packedchar name (MAXPACKEDFNAME), pwd (3) integer attach Library: vswtlb (standard Subsystem library) _F_u_n_c_t_i_o_n | 'Getto' attaches to the UFD containing the file specified in | the last node of the pathname 'path.' In order to make | further operations on the file convenient, it packs the name | of the last node in the path (usually a file name) two | characters per word, left justified, blank filled into the | argument 'name', and similarly packs the password (if any) | into the argument 'pwd'. Passwords are always mapped to upper case. 'Getto' returns ERR if the UFD containing the file could not | be attached; OK otherwise. If 'getto' returns with 'attach' | set to NO, the current UFD was not changed; if YES, then the | parent directory of the last file in the path became the | current directory. _I_m_p_l_e_m_e_n_t_a_t_i_o_n | 'Getto' sets up an on-unit for the "BAD_PASSWORD$" condition | to handle errors during the attaching process. Then it | expands any pathname templates in 'path', converting the | _S_o_f_t_w_a_r_e _T_o_o_l_s-style pathname into a Primos treename by cal- | ling 'mktr$'. If the pathname supplied is empty, 'getto' | attaches back to the home directory by calling the Primos | routine AT$HOM. Otherwise, it loops through the nodes in | the treename until it has attached to the parent directory | of the last node. If the treename refers to a primary UFD | (one in the master file directory of some disk), 'getto' | uses the Primos routine AT$ANY to attach to the named UFD, | and then attaches to the MFD on the same disk using the | Primos routine AT$ABS. If the treename is a fully specified | path including packname, 'getto' checks see to if the pack- | name specifies a logical disk number. If it does, the | Primos routine AT$ is called to attach to the primary UFD on | the specified disk pack; otherwise the AT$ABS is called to | do the attach. Then 'getto' attaches to the MFD on the same | disk using AT$ABS. If the last node of the treename has not | been reached, 'getto' attaches down the path by calling the | Primos routine AT$REL. If any errors occur during the | attaching process, 'getto' attaches back to the home direc- | tory and returns ERR. getto (2) - 1 - getto (2) getto (2) --- get to the last file in a pathname 08/28/84 _A_r_g_u_m_e_n_t_s _M_o_d_i_f_i_e_d name, pwd, attach _C_a_l_l_s | bponu$, ctov, expand, mapstr, mktr$, Primos at$, Primos | at$abs, Primos at$any, Primos at$hom, Primos at$rel, Primos | break$, Primos mklb$f, Primos mkonu$ _S_e_e _A_l_s_o follow (2), open (2), remove (2) getto (2) - 2 - getto (2)