JX Application Framework
Loading...
Searching...
No Matches
Classes | Enumerations | Functions
jMountUtil.h File Reference
#include "JPtrArray-JString.h"
#include "JError.h"
Include dependency graph for jMountUtil.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  JMountPoint
 
union  JMountState
 
class  JMountPointList
 

Enumerations

enum  JMountType {
  kJHardDisk = 0 ,
  kJFloppyDisk ,
  kJCDROM ,
  kJObsolete1 ,
  kJUnknownMountType
}
 
enum  JFileSystemType {
  kOtherFSType = 0 ,
  kVFATType
}
 

Functions

bool JGetUserMountPointList (JMountPointList *list, JMountState *state)
 
JMountType JGetUserMountPointType (const JString &path, const JString &device, const JString &fsType)
 
bool JIsMounted (const JString &path, bool *writable=nullptr, bool *isTop=nullptr, JString *device=nullptr, JFileSystemType *fsType=nullptr, JString *fsTypeString=nullptr)
 
bool JFindUserMountPoint (const JString &path, const JMountPointList &list, JIndex *index)
 
void JMount (const JString &path, const bool mount=true, const bool block=false)
 
bool JTranslateLocalToRemote (const JString &localPathStr, JString *host, JString *remotePath)
 
bool JTranslateRemoteToLocal (const JString &hostStr, const JString &remotePathStr, JString *localPath)
 
JError JFormatPartition (const JString &path, const JString &type, JProcess **process)
 
bool JIsSamePartition (const JString &path1, const JString &path2)
 
bool JMountSupportsExecFlag (const JFileSystemType type)
 

Enumeration Type Documentation

◆ JFileSystemType

Enumerator
kOtherFSType 
kVFATType 

◆ JMountType

enum JMountType
Enumerator
kJHardDisk 
kJFloppyDisk 
kJCDROM 
kJObsolete1 
kJUnknownMountType 

Function Documentation

◆ JFindUserMountPoint()

bool JFindUserMountPoint ( const JString path,
const JMountPointList list,
JIndex index 
)

Returns true if the given path is on a mounted partition.

◆ JFormatPartition()

JError JFormatPartition ( const JString path,
const JString type,
JProcess **  process 
)

Erases the specified partition and converts it to the specified type.

Linux: ext2
DOS:   msdos

Others may be supported on various systems.

Use with extreme caution!

◆ JGetUserMountPointList()

bool JGetUserMountPointList ( JMountPointList list,
JMountState state 
)

◆ JGetUserMountPointType()

JMountType JGetUserMountPointType ( const JString path,
const JString device,
const JString fsType 
)

Returns the type of the specified mount point.

◆ JIsMounted()

bool JIsMounted ( const JString path,
bool writable,
bool isTop,
JString device,
JFileSystemType fsType,
JString fsTypeString 
)

device can be nullptr

◆ JIsSamePartition()

bool JIsSamePartition ( const JString path1,
const JString path2 
)

Returns true if the two directories are on the same partition.

◆ JMount()

void JMount ( const JString path,
const bool  mount,
const bool  block 
)

To determine whether or not this function succeeded, call it with block=true and then check JIsMounted().

If mount = false, the file system is unmounted instead.

◆ JMountSupportsExecFlag()

bool JMountSupportsExecFlag ( const JFileSystemType  type)
inline

◆ JTranslateLocalToRemote()

bool JTranslateLocalToRemote ( const JString localPathStr,
JString host,
JString remotePath 
)

◆ JTranslateRemoteToLocal()

bool JTranslateRemoteToLocal ( const JString hostStr,
const JString remotePathStr,
JString localPath 
)