MgErr FCreate(fdp, path, permissions, openMode, denyMode, group);
Creates a file with the name and location specified by path and with the specified permissions, and opens it for writing and reading, as specified by openMode. If the file already exists, the function returns an error.
You can use denyMode to control concurrent access to the file from within LabVIEW. You can use the group parameter to assign the file to a Linux group. LabVIEW ignores group on Windows and Mac OS X.
If the function creates the file, the resulting file descriptor is stored in the address referred to by fdp. If an error occurs, the function stores 0 in the address referred to by fdp and returns an error.
Note Before you call this function, ensure that you understand how to use pointers as parameters. |
Name | Type | Description |
---|---|---|
fdp | File * | Address at which FCreate stores the file descriptor for the new file. If FCreate fails, it stores 0 in the address fdp. This parameter is a pointer. |
path | Path | Path of the file you want to create. |
permissions | int32 | Permissions to assign to the new file. |
openMode | int32 | Access mode to use in opening the file. The following values are defined in the file extcode.h.
|
denyMode | int32 | Mode that determines what level of concurrent access to the file is allowed. The following values are defined in the file extcode.h.
|
group | PStr | Linux group you want to assign to the new file. |
MgErr, which can contain the following errors. If you receive errors from LabVIEW Manager functions, most error names correspond to LabVIEW error codes.
Value | Corresponding Error Code or Description |
---|---|
noErr | No error. |
mgArgErr | 1 |
fIsOpen | 5. This error is returned only on Mac OS X. Windows returns fIOErr. |
fIOErr | 6 |
fNoPerm | 8 |
fDupPath | 10 |
fTMFOpen | 11 |