Search This Blog

Showing posts with label File Class. Show all posts
Showing posts with label File Class. Show all posts

Monday, February 9, 2015

%FilePath_Absolute and %Filepath_Relative


These are the meta variables used generally with File Classes.
Both of the help us in defining the path of the file. One of them is Absolute and other one is Relative.

I will not go much details about the syntax of the functions which use these variables.

I believe most of you might have put this question to your self when encounterd with below variables like what is Absolute path and Relative path.

 %FilePath_Absolute: We define the actual path on the server.
                                    We can place file on any folder path in the server.

Ex:- PS_HOME/user/filename.txt

%Filepath_Relative: This uses the system defined path.
                                  Files can be placed in the sub-folders beneath this path.
                                  System Defined paths are like PS_FILEDIR/PS_SERVDIR etc.

Ex:- PS_FILEDIR/filename.txt

Saturday, November 30, 2013

GetFile and Open file

Both get file and open file are used to access file from server.
Both have the same syntax.
GetFile(filename, mode [, charset] [, pathtype])
Open   (filespec, mode [, charset] [, pathtype])

Only difference is that Whenever a call is made to GetFile , a new instance is created. Meaning each instance requires a separate file object to refer the file.
So usage of Getfile will be effective in case multiple files are accesed at a time.

For Open file , for each call same file object is used to access file.
That means, file object &File can be used to access file1 and subsequent call to another file closes the current file and accesses the another file.