Jump to content

FSH ISCURDIRPREFIX: Difference between revisions

From EDM2
Created page with "This function allows FSDs to disallow any modification of any directory that is either a current directory of some process or the parent of any current directory of some proce..."
 
Ak120 (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
{{DISPLAYTITLE:FSH_ISCURDIRPREFIX}}
This function allows FSDs to disallow any modification of any directory that is either a current directory of some process or the parent of any current directory of some process. This is necessary because the kernel manages the text of each current directory for each process.
This function allows FSDs to disallow any modification of any directory that is either a current directory of some process or the parent of any current directory of some process. This is necessary because the kernel manages the text of each current directory for each process.


==Syntax==
==Syntax==
  FSH_ISCURDIRPREFIX(pName)
  FSH_ISCURDIRPREFIX(pName)
==Parameters==
==Parameters==
;pName: is a pointer to the path name.  
;pName: is a pointer to the path name.
:The name must be in canonical form, that is, no '.' or '..' components, uppercase, no meta characters, and full path name specified.


:The name must be in canonical form, that is, no '.' or ' ..' components, uppercase, no meta characters, and full path name specified.
==Returns==
==Returns==
If no error is detected, a zero error code is returned. If an error is detected, one of the following error codes is returned:  
If no error is detected, a zero error code is returned. If an error is detected, one of the following error codes is returned:
 
* ERROR_CURRENT_DIRECTORY the specified path is a prefix of or is equal to the current directory of some process.
* ERROR_CURRENT_DIRECTORY the specified path is a prefix of or is equal to the current directory of some process.  
If the current directory is the root and the path name is `d:\`, ERROR_CURRENT_DIRECTORY will be returned.


If the current directory is the root and the path name is `d:\ `, ERROR_CURRENT_DIRECTORY will be returned.
==Calling Sequence==
==Calling Sequence==
<PRE>
<PRE>
Line 19: Line 20:
char far * pMsg;
char far * pMsg;
</PRE>
</PRE>
==Remarks==
==Remarks==
FSH_ISCURDIRPREFIX takes the supplied path name, enumerates all current directories in use, and tests to see if the specified path name is a prefix or is equal to some current directory.  
FSH_ISCURDIRPREFIX takes the supplied path name, enumerates all current directories in use, and tests to see if the specified path name is a prefix or is equal to some current directory.


FSH_ISCURDIRPREFIX may block.  
FSH_ISCURDIRPREFIX may block.
 
;Note: OS/2 does not validate input parameters. An FSD, therefore, should call FSH_PROBEBUF where appropriate. 


;Note: OS/2 does not validate input parameters. An FSD, therefore, should call [[FSH_PROBEBUF]] where appropriate.


[[Category:IFS Interfaces]]
[[Category:IFS Interfaces]]
{{DISPLAYTITLE:FSH_ISCURDIRPREFIX}}

Latest revision as of 04:48, 20 February 2020

This function allows FSDs to disallow any modification of any directory that is either a current directory of some process or the parent of any current directory of some process. This is necessary because the kernel manages the text of each current directory for each process.

Syntax

FSH_ISCURDIRPREFIX(pName)

Parameters

pName
is a pointer to the path name.
The name must be in canonical form, that is, no '.' or '..' components, uppercase, no meta characters, and full path name specified.

Returns

If no error is detected, a zero error code is returned. If an error is detected, one of the following error codes is returned:

  • ERROR_CURRENT_DIRECTORY the specified path is a prefix of or is equal to the current directory of some process.

If the current directory is the root and the path name is `d:\`, ERROR_CURRENT_DIRECTORY will be returned.

Calling Sequence

int far pascal FSH_ISCURDIRPREFIX(pName)

char far * pMsg;

Remarks

FSH_ISCURDIRPREFIX takes the supplied path name, enumerates all current directories in use, and tests to see if the specified path name is a prefix or is equal to some current directory.

FSH_ISCURDIRPREFIX may block.

Note
OS/2 does not validate input parameters. An FSD, therefore, should call FSH_PROBEBUF where appropriate.