osfile.inc 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. {
  2. $Id$
  3. This file is part of the Free Component Library (FCL)
  4. Copyright (c) 1998 by the Free Pascal development team
  5. See the file COPYING.FPC, included in this distribution,
  6. for details about the copyright.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. **********************************************************************}
  11. {
  12. This file implements the system-dependent calls needed for the
  13. classes unit.
  14. }
  15. Function OSCreateFile (Const Filename : string; Mode : Longint) : longint;
  16. {
  17. Creates a file with name FileName, using mode MODE
  18. --> Filename : String giving the path to the file.
  19. Mode : Mode can be
  20. fmCreate : Create file;
  21. fmOpenRead : open for reading;
  22. fmOpenWrite : open for writing;
  23. <-- File Handle, or -1 on error.
  24. }
  25. begin
  26. end;
  27. Function OSReadHandle(Handle : Longint;Var Buffer; Count : Longint): Longint;
  28. {
  29. Read from a handle
  30. --> Handle : file,pipe,etc Handle to read from.
  31. Buffer : Location where to put the read bytes.
  32. Count : Number of bytes that should be read
  33. <-- Number of bytes actually read, or -1 on error.
  34. }
  35. begin
  36. end;
  37. Function OSWriteHandle(Handle : Longint;var Buffer; Count : longint) : Longint;
  38. {
  39. Write to a handle
  40. --> Handle : file,pipe,etc Handle to write to.
  41. Buffer : Location where to get the bytes.
  42. Count : Number of bytes that should be written.
  43. <-- Number of bytes actually written, or -1 on error.
  44. }
  45. begin
  46. end;
  47. Function OSSetHandleSize (Handle,Size : Longint) : longint;
  48. {
  49. Set size of handle (for files only)
  50. --> Handle : Handle to set size for.
  51. Size : Size to be set.
  52. <-- 0 on success, or -1 on error.
  53. }
  54. begin
  55. end;
  56. Function OSSeekHandle (FHandle,OffSet,Origin : longint) : longint;
  57. {
  58. Seek Handle position starting from Origin
  59. --> Handle : Handle of file to do seek on.
  60. Offset : Position to seek.
  61. Origin : Where to start seek:
  62. soFromBeginning
  63. soFromCurrent
  64. soFromEnd
  65. <-- 0 on succes, -1 on error.
  66. }
  67. begin
  68. end;
  69. Function OSCloseHandle (Handle : longint) : longint;
  70. {
  71. Close file associated with HAndle.
  72. --> Handle : Handle of file to do seek on.
  73. <-- 0 on succes, -1 on error.
  74. }
  75. begin
  76. end;