EasyCV  0.9.36
Easy! Computer Vision
Classes | Static Public Member Functions | Static Private Attributes | List of all members
util.Data_IO_Utils Class Reference

Classes

enum  FS_ObjectType
 

Static Public Member Functions

static String unixPathStr (String anyPath)
 
static String osPathStr (String anyPath)
 
static void dieRuntime_IfNull (Object testObj, String msg)
 
static void createPgm_forImageFile (String fnameWithPath)
 
static void createDir_orFile (File objToCreate) throws IOException
 
static void createDir_orFile (File objToCreate, FS_ObjectType objType) throws IOException
 
static void clearDir_ifNonempty (File rootDirToClear) throws IOException
 
static String getRelativePath (String targetPath, String basePath, String pathSeparator)
 
static String getLocalFileNameFromRemoteFile (File remoteFile)
 
static String getLocalFileNameFromRemote (String remoteName)
 
static String getFSPath (cvac.FilePath file, String CVAC_DataDir)
 

Static Private Attributes

static String os_sepChar = System.getProperty("file.separator")
 
static String usersHomeDir = osPathStr(System.getProperty("user.home"))
 
static final Logger logger = Logger.getLogger(Corpus.class.getName())
 

Detailed Description

Author
jcs

Member Function Documentation

static void util.Data_IO_Utils.clearDir_ifNonempty ( File  rootDirToClear) throws IOException
inlinestatic
static void util.Data_IO_Utils.createDir_orFile ( File  objToCreate) throws IOException
inlinestatic
static void util.Data_IO_Utils.createDir_orFile ( File  objToCreate,
FS_ObjectType  objType 
) throws IOException
inlinestatic

Check type of incoming file and convert if necessary Save (.pgm) file in temporary directory-tree for s_o_c detector use

static void util.Data_IO_Utils.createPgm_forImageFile ( String  fnameWithPath)
inlinestatic
static void util.Data_IO_Utils.dieRuntime_IfNull ( Object  testObj,
String  msg 
)
inlinestatic
static String util.Data_IO_Utils.getFSPath ( cvac.FilePath  file,
String  CVAC_DataDir 
)
inlinestatic
static String util.Data_IO_Utils.getLocalFileNameFromRemote ( String  remoteName)
inlinestatic
static String util.Data_IO_Utils.getLocalFileNameFromRemoteFile ( File  remoteFile)
inlinestatic
static String util.Data_IO_Utils.getRelativePath ( String  targetPath,
String  basePath,
String  pathSeparator 
)
inlinestatic

Get the relative path from one file to another, specifying the directory separator. If one of the provided resources does not exist, it is assumed to be a file unless it ends with '/' or '\'.

Parameters
targetPathis calculated to this file
basePathis calculated from this file
pathSeparatordirectory separator.

The platform default is not assumed so that we can test Unix behavior when running on Windows (for example) Code source: http://stackoverflow.com/questions/204784/how-to-construct-a-relative-path-in-java-from-two-absolute-paths-or-urls/3054692#3054692 Note the Unit-tests demonstrating correctness of features: /test/CVAC/utility_code/Data_IO_UtilsTest.java

static String util.Data_IO_Utils.osPathStr ( String  anyPath)
inlinestatic
static String util.Data_IO_Utils.unixPathStr ( String  anyPath)
inlinestatic

Member Data Documentation

final Logger util.Data_IO_Utils.logger = Logger.getLogger(Corpus.class.getName())
staticprivate
String util.Data_IO_Utils.os_sepChar = System.getProperty("file.separator")
staticprivate
String util.Data_IO_Utils.usersHomeDir = osPathStr(System.getProperty("user.home"))
staticprivate

The documentation for this class was generated from the following file: