irods  4.2.8
About: iRODS (the integrated Rule Oriented Data System) is a distributed data-management system for creating data grids, digital libraries, persistent archives, and real-time data systems.
  Fossies Dox: irods-4.2.8.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

fileOpr.hpp
Go to the documentation of this file.
1 
4 /* fileOpr.h - header file for fileOpr.c
5  */
6 
7 
8 
9 #ifndef FILE_OPR_HPP
10 #define FILE_OPR_HPP
11 
12 #include "rodsConnect.h"
13 #include "fileDriver.hpp"
14 #include "chkNVPathPerm.h"
15 
16 #define NUM_FILE_DESC 1026 /* number of FileDesc */
17 
18 /* definition for inuseFlag */
19 
20 #define FD_FREE 0
21 #define FD_INUSE 1
22 
23 #define STREAM_FILE_NAME "stream" /* a fake file name for stream */
24 typedef struct {
25  int inuseFlag; /* whether the fileDesc is in use, 0=no */
27  char *fileName;
28  char *rescHier; // The hierarchy of resources in which this file resides
29  char *objPath; // The logical path
30  int mode;
31  int chkPerm; /* check for permission in the file vault */
32  int fd; /* the file descriptor from driver */
33  int writtenFlag; /* indicated whether the file has been written to */
34  void *driverDep; /* driver dependent stuff */
35 } fileDesc_t;
36 
37 int
38 initFileDesc();
39 
40 int
42 
43 int
44 allocAndFillFileDesc( rodsServerHost_t *rodsServerHost, const std::string& objPath,
45  const std::string& fileName, const std::string& rescHier, int fd, int mode );
46 
47 int
48 freeFileDesc( int fileInx );
49 
50 int
52 int
53 mkDirForFilePath( rsComm_t *rsComm, size_t startDirLen, const std::string& filePath, const std::string& hier, int mode );
54 int
55 mkFileDirR( rsComm_t *rsComm, size_t startDirLen, const std::string& destDir, const std::string& hier, int mode );
56 int
57 chkFilePathPerm( rsComm_t *rsComm, fileOpenInp_t *fileOpenInp,
58  rodsServerHost_t *rodsServerHost, int chkType ); // JMC - backport 4774
59 int // JMC - backport 4766
60 isValidFilePath( const std::string& path );
61 
62 int
64  const std::string&,
66 int
67 chkEmptyDir( rsComm_t *rsComm, const std::string& cacheDir, const std::string& hier );
68 int
69 filePathTypeInResc( rsComm_t *rsComm, const std::string& objPath, const std::string& fileName, const std::string& rescHier );
70 int
72 #endif /* FILE_OPR_H */
rsComm_t
Definition: rcConnect.h:145
fileDesc_t::mode
int mode
Definition: fileOpr.hpp:30
getServerHostByFileInx
int getServerHostByFileInx(int fileInx, rodsServerHost_t **rodsServerHost)
Definition: fileOpr.cpp:99
filePathTypeInResc
int filePathTypeInResc(rsComm_t *rsComm, const std::string &objPath, const std::string &fileName, const std::string &rescHier)
Definition: fileOpr.cpp:529
fileDesc_t::driverDep
void * driverDep
Definition: fileOpr.hpp:34
fileDriver.hpp
rodsConnect.h
fileDesc_t::rescHier
char * rescHier
Definition: fileOpr.hpp:28
chkNVPathPerm.h
chkEmptyDir
int chkEmptyDir(rsComm_t *rsComm, const std::string &cacheDir, const std::string &hier)
Definition: fileOpr.cpp:263
fileDesc_t::inuseFlag
int inuseFlag
Definition: fileOpr.hpp:25
matchCliVaultPath
int matchCliVaultPath(rsComm_t *, const std::string &, rodsServerHost_t *)
Definition: fileOpr.cpp:460
fileDesc_t::objPath
char * objPath
Definition: fileOpr.hpp:29
fileDesc_t::rodsServerHost
rodsServerHost_t * rodsServerHost
Definition: fileOpr.hpp:26
isValidFilePath
int isValidFilePath(const std::string &path)
Definition: fileOpr.cpp:443
freeFileDesc
int freeFileDesc(int fileInx)
Definition: fileOpr.cpp:72
fileDesc_t::writtenFlag
int writtenFlag
Definition: fileOpr.hpp:33
allocAndFillFileDesc
int allocAndFillFileDesc(rodsServerHost_t *rodsServerHost, const std::string &objPath, const std::string &fileName, const std::string &rescHier, int fd, int mode)
Definition: fileOpr.cpp:48
bindStreamToIRods
int bindStreamToIRods(rodsServerHost_t *rodsServerHost, int fd)
Definition: fileOpr.cpp:576
mkFileDirR
int mkFileDirR(rsComm_t *rsComm, size_t startDirLen, const std::string &destDir, const std::string &hier, int mode)
Definition: fileOpr.cpp:147
fileDesc_t::chkPerm
int chkPerm
Definition: fileOpr.hpp:31
fileOpenInp_t
Definition: fileOpen.h:14
chkFilePathPerm
int chkFilePathPerm(rsComm_t *rsComm, fileOpenInp_t *fileOpenInp, rodsServerHost_t *rodsServerHost, int chkType)
Definition: fileOpr.cpp:381
rodsServerHost
Definition: rodsConnect.h:62
fileDesc_t::fd
int fd
Definition: fileOpr.hpp:32
initFileDesc
int initFileDesc()
Definition: fileOpr.cpp:25
allocFileDesc
int allocFileDesc()
Definition: fileOpr.cpp:31
mode
int mode
Definition: filesystem.cpp:104
mkDirForFilePath
int mkDirForFilePath(rsComm_t *rsComm, size_t startDirLen, const std::string &filePath, const std::string &hier, int mode)
Definition: fileOpr.cpp:120
fileDesc_t
Definition: fileOpr.hpp:24
fileDesc_t::fileName
char * fileName
Definition: fileOpr.hpp:27