|(anonymous IP: 184.108.40.206,256)|
Total files: 1536
Full index file
Recent index file
Part of aros exec
[Show comments] [Show snapshots] [Show videos] [Show content] [Replace file]
Programname: fileOP Description: file operations under shell. Author: Azvareth Target group: Those who need to manipulate content of a file without resorting : to developer tools, or to those who need to view how to access : DOS.library functions from FreePascal. WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING - on invalid handle your computer will most likely crash - WARNING WARNING - - WARNING WARNING - I take no responsibility, I have tried to make it secure - WARNING WARNING - within the limitations... Usage is on own risk. - WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING : OPEN <mode> <filename> : CLOSE <handle> : READ <handle> <length> <fromPos> : WRITE <handle> <fromPos> <string> : SEEK <handle> <position> <offset mode> fileOP USAGE: fileOP: OPEN <mode> <filename> - Open a file and return a handle for file. set fh `fileOP OPEN NEW "text"` - modes are NEW, OLD, READWRITE - NEW - a new file is created, if a file exists it is erased OLD - an existing file is opened READWRITE - an existing file is opened otherwise a new one is created fileOP: CLOSE <handle> - close a file referenced by handle retrived from fileOP CLOSE $fh - OPEN fileOP: READ <handle> <length> - read from file referenced by handle, number of set sin `fileOP READ $fh 3` - chars actually read - will set fopResult to number of chars read - will write string to Shell CON: fileOP: WRITE <handle> <string> - write to file referenced by handle, string to be fileOP WRITE $fh "the new fox in town..." - be written - will set fopResult to number of chars written - will write number of chars written to Shell CON: fileOP: SEEK <handle> <pos> <offs> - change the current position in file and reads - the current position, return position in file - before SEEK was called, position may be positive - or negative. Offset modes are CURRENT, BEGINNING - END. fileOP: SEEK $fh 0 "CURRENT" will return current position in file Notes 1: in case of an error fileOP <COMMAND> will set fopResult to -1, if not stated otherwise (or forgotten) 2: fopResult is only valid until next fileOP call, when it may be overwritten License License License License License License License License License License License License License All rights Yea! I guess I need to tell you all rights I might have here... I do not have any, every code I publish or every line of text I write is public, that means everyone have the right to use and or missuse it... I however add this few lines that will make an exception to the public rule: This might not be likely but it may state my opinion! 1. The code or text may NOT be used in any way that contributes to war (real, civil or any kind of military like action against other humans) 2. The code or text may NOT be used in anyway that threaten earths life, that is trees, animals by pollution or greed... exception to this rule is normal use of earth resources to live and function. 3. The code or text may under no way be used by people that believe that one human race is less worth than another race, it may not be used by anyone that believe (may be political or religious) that they have more rights and therefore oppress someone else...