@Namespace(value="tensorflow") @NoOffset @Properties(inherit=tensorflow.class) public class Env extends Pointer
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
Env(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
Status |
CopyFile(BytePointer src,
BytePointer target)
\brief Copy the src to target.
|
Status |
CopyFile(String src,
String target) |
Status |
CreateDir(BytePointer dirname)
\brief Creates the specified directory.
|
Status |
CreateDir(String dirname) |
boolean |
CreateUniqueFileName(BytePointer prefix,
BytePointer suffix)
Creates a local unique file name that starts with |prefix| and ends with
|suffix|.
|
boolean |
CreateUniqueFileName(BytePointer prefix,
String suffix) |
static Env |
Default()
\brief Returns a default environment suitable for the current operating
system.
|
Status |
DeleteDir(BytePointer dirname)
Deletes the specified directory.
|
Status |
DeleteDir(String dirname) |
Status |
DeleteFile(BytePointer fname)
Deletes the named file.
|
Status |
DeleteFile(String fname) |
Status |
DeleteRecursively(BytePointer dirname,
long[] undeleted_files,
long... undeleted_dirs) |
Status |
DeleteRecursively(BytePointer dirname,
LongBuffer undeleted_files,
LongBuffer undeleted_dirs) |
Status |
DeleteRecursively(BytePointer dirname,
LongPointer undeleted_files,
LongPointer undeleted_dirs)
\brief Deletes the specified directory and all subdirectories and files
underneath it.
|
Status |
DeleteRecursively(String dirname,
long[] undeleted_files,
long... undeleted_dirs) |
Status |
DeleteRecursively(String dirname,
LongBuffer undeleted_files,
LongBuffer undeleted_dirs) |
Status |
DeleteRecursively(String dirname,
LongPointer undeleted_files,
LongPointer undeleted_dirs) |
Status |
FileExists(BytePointer fname)
Returns OK if the named path exists and NOT_FOUND otherwise.
|
Status |
FileExists(String fname) |
boolean |
FilesExist(StringVector files,
Status status)
Returns true if all the listed files exist, false otherwise.
|
Status |
FlushFileSystemCaches()
\brief Flush filesystem caches for all registered filesystems.
|
BytePointer |
FormatLibraryFileName(BytePointer name,
BytePointer version) |
String |
FormatLibraryFileName(String name,
String version) |
Status |
GetChildren(BytePointer dir,
StringVector result)
\brief Stores in *result the names of the children of the specified
directory.
|
Status |
GetChildren(String dir,
StringVector result) |
int |
GetCurrentThreadId() |
boolean |
GetCurrentThreadName(BytePointer name) |
BytePointer |
GetExecutablePath()
\brief Returns the absolute path of the current executable.
|
Status |
GetFileSize(BytePointer fname,
long... file_size) |
Status |
GetFileSize(BytePointer fname,
LongBuffer file_size) |
Status |
GetFileSize(BytePointer fname,
LongPointer file_size)
Stores the size of
fname in *file_size . |
Status |
GetFileSize(String fname,
long... file_size) |
Status |
GetFileSize(String fname,
LongBuffer file_size) |
Status |
GetFileSize(String fname,
LongPointer file_size) |
Status |
GetFileSystemForFile(BytePointer fname,
FileSystem result) |
Status |
GetFileSystemForFile(BytePointer fname,
PointerPointer result)
\brief Returns the FileSystem object to handle operations on the file
specified by 'fname'.
|
Status |
GetFileSystemForFile(String fname,
FileSystem result) |
void |
GetLocalTempDirectories(StringVector list) |
Status |
GetMatchingPaths(BytePointer pattern,
StringVector results)
\brief Given a pattern, stores in *results the set of paths that matches
that pattern.
|
Status |
GetMatchingPaths(String pattern,
StringVector results) |
Status |
GetRegisteredFileSystemSchemes(StringVector schemes)
\brief Returns the file system schemes registered for this Env.
|
BytePointer |
GetRunfilesDir()
\brief Return the runfiles directory if running under bazel.
|
Status |
GetSymbolFromLibrary(Pointer handle,
BytePointer symbol_name,
Pointer symbol) |
Status |
GetSymbolFromLibrary(Pointer handle,
BytePointer symbol_name,
PointerPointer symbol) |
Status |
GetSymbolFromLibrary(Pointer handle,
String symbol_name,
Pointer symbol) |
Status |
IsDirectory(BytePointer fname)
\brief Returns whether the given path is a directory or not.
|
Status |
IsDirectory(String fname) |
Status |
LoadLibrary(BytePointer library_filename,
Pointer handle) |
Status |
LoadLibrary(BytePointer library_filename,
PointerPointer handle) |
Status |
LoadLibrary(String library_filename,
Pointer handle) |
boolean |
LocalTempFilename(BytePointer filename)
Creates a local unique temporary file name.
|
boolean |
MatchPath(BytePointer path,
BytePointer pattern)
\brief Returns true if the path matches the given pattern.
|
boolean |
MatchPath(String path,
String pattern) |
Status |
NewAppendableFile(BytePointer fname,
WritableFile result)
\brief Creates an object that either appends to an existing file, or
writes to a new file (if the file does not exist to begin with).
|
Status |
NewAppendableFile(String fname,
WritableFile result) |
Status |
NewRandomAccessFile(BytePointer fname,
RandomAccessFile result)
\brief Creates a brand new random access read-only file with the
specified name.
|
Status |
NewRandomAccessFile(String fname,
RandomAccessFile result) |
Status |
NewReadOnlyMemoryRegionFromFile(BytePointer fname,
ReadOnlyMemoryRegion result)
\brief Creates a readonly region of memory with the file context.
|
Status |
NewReadOnlyMemoryRegionFromFile(String fname,
ReadOnlyMemoryRegion result) |
Status |
NewWritableFile(BytePointer fname,
WritableFile result)
\brief Creates an object that writes to a new file with the specified
name.
|
Status |
NewWritableFile(String fname,
WritableFile result) |
long |
NowMicros()
\brief Returns the number of micro-seconds since the Unix epoch.
|
long |
NowNanos()
\brief Returns the number of nano-seconds since the Unix epoch.
|
long |
NowSeconds()
\brief Returns the number of seconds since the Unix epoch.
|
Status |
RecursivelyCreateDir(BytePointer dirname)
\brief Creates the specified directory and all the necessary
subdirectories.
|
Status |
RecursivelyCreateDir(String dirname) |
Status |
RegisterFileSystem(BytePointer scheme,
tensorflow.FactoryFn factory)
\brief Register a file system for a scheme.
|
Status |
RegisterFileSystem(String scheme,
tensorflow.FactoryFn factory) |
Status |
RenameFile(BytePointer src,
BytePointer target)
\brief Renames file src to target.
|
Status |
RenameFile(String src,
String target) |
void |
SchedClosure(tensorflow.Fn closure) |
void |
SchedClosureAfter(long micros,
tensorflow.Fn closure) |
void |
SleepForMicroseconds(long micros)
Sleeps/delays the thread for the prescribed number of micro-seconds.
|
Thread |
StartThread(ThreadOptions thread_options,
BytePointer name,
tensorflow.Fn fn)
\brief Returns a new thread that is running fn() and is identified
(for debugging/performance-analysis) by "name".
|
Thread |
StartThread(ThreadOptions thread_options,
String name,
tensorflow.Fn fn) |
Status |
Stat(BytePointer fname,
FileStatistics stat)
Obtains statistics for the given path.
|
Status |
Stat(String fname,
FileStatistics stat) |
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zero
public Env(Pointer p)
Pointer(Pointer)
.public static Env Default()
@ByVal public Status GetFileSystemForFile(@StdString BytePointer fname, @Cast(value="tensorflow::FileSystem**") PointerPointer result)
@ByVal public Status GetFileSystemForFile(@StdString BytePointer fname, @ByPtrPtr FileSystem result)
@ByVal public Status GetFileSystemForFile(@StdString String fname, @ByPtrPtr FileSystem result)
@ByVal public Status GetRegisteredFileSystemSchemes(StringVector schemes)
@ByVal public Status RegisterFileSystem(@StdString BytePointer scheme, @ByVal @Cast(value="tensorflow::FileSystemRegistry::Factory*") tensorflow.FactoryFn factory)
@ByVal public Status RegisterFileSystem(@StdString String scheme, @ByVal @Cast(value="tensorflow::FileSystemRegistry::Factory*") tensorflow.FactoryFn factory)
@ByVal public Status FlushFileSystemCaches()
@ByVal public Status NewRandomAccessFile(@StdString BytePointer fname, @UniquePtr RandomAccessFile result)
On success, stores a pointer to the new file in *result and returns OK. On failure stores NULL in *result and returns non-OK. If the file does not exist, returns a non-OK status. The returned file may be concurrently accessed by multiple threads. The ownership of the returned RandomAccessFile is passed to the caller and the object should be deleted when is not used. The file object shouldn't live longer than the Env object.
@ByVal public Status NewRandomAccessFile(@StdString String fname, @UniquePtr RandomAccessFile result)
@ByVal public Status NewWritableFile(@StdString BytePointer fname, @UniquePtr WritableFile result)
@ByVal public Status NewWritableFile(@StdString String fname, @UniquePtr WritableFile result)
@ByVal public Status NewAppendableFile(@StdString BytePointer fname, @UniquePtr WritableFile result)
@ByVal public Status NewAppendableFile(@StdString String fname, @UniquePtr WritableFile result)
@ByVal public Status NewReadOnlyMemoryRegionFromFile(@StdString BytePointer fname, @UniquePtr ReadOnlyMemoryRegion result)
@ByVal public Status NewReadOnlyMemoryRegionFromFile(@StdString String fname, @UniquePtr ReadOnlyMemoryRegion result)
@ByVal public Status FileExists(@StdString BytePointer fname)
@ByVal public Status FileExists(@StdString String fname)
@Cast(value="bool") public boolean FilesExist(@Const @ByRef StringVector files, @StdVector Status status)
@ByVal public Status GetChildren(@StdString BytePointer dir, StringVector result)
@ByVal public Status GetChildren(@StdString String dir, StringVector result)
@Cast(value="bool") public boolean MatchPath(@StdString BytePointer path, @StdString BytePointer pattern)
@Cast(value="bool") public boolean MatchPath(@StdString String path, @StdString String pattern)
@ByVal public Status GetMatchingPaths(@StdString BytePointer pattern, StringVector results)
pattern
in FileSystem::GetMatchingPaths.@ByVal public Status GetMatchingPaths(@StdString String pattern, StringVector results)
@ByVal public Status DeleteFile(@StdString BytePointer fname)
@ByVal public Status DeleteFile(@StdString String fname)
@ByVal public Status DeleteRecursively(@StdString BytePointer dirname, @Cast(value="tensorflow::int64*") LongPointer undeleted_files, @Cast(value="tensorflow::int64*") LongPointer undeleted_dirs)
@ByVal public Status DeleteRecursively(@StdString String dirname, @Cast(value="tensorflow::int64*") LongBuffer undeleted_files, @Cast(value="tensorflow::int64*") LongBuffer undeleted_dirs)
@ByVal public Status DeleteRecursively(@StdString BytePointer dirname, @Cast(value="tensorflow::int64*") long[] undeleted_files, @Cast(value="tensorflow::int64*") long... undeleted_dirs)
@ByVal public Status DeleteRecursively(@StdString String dirname, @Cast(value="tensorflow::int64*") LongPointer undeleted_files, @Cast(value="tensorflow::int64*") LongPointer undeleted_dirs)
@ByVal public Status DeleteRecursively(@StdString BytePointer dirname, @Cast(value="tensorflow::int64*") LongBuffer undeleted_files, @Cast(value="tensorflow::int64*") LongBuffer undeleted_dirs)
@ByVal public Status DeleteRecursively(@StdString String dirname, @Cast(value="tensorflow::int64*") long[] undeleted_files, @Cast(value="tensorflow::int64*") long... undeleted_dirs)
@ByVal public Status RecursivelyCreateDir(@StdString BytePointer dirname)
@ByVal public Status RecursivelyCreateDir(@StdString String dirname)
@ByVal public Status CreateDir(@StdString BytePointer dirname)
@ByVal public Status CreateDir(@StdString String dirname)
@ByVal public Status DeleteDir(@StdString BytePointer dirname)
@ByVal public Status DeleteDir(@StdString String dirname)
@ByVal public Status Stat(@StdString BytePointer fname, FileStatistics stat)
@ByVal public Status Stat(@StdString String fname, FileStatistics stat)
@ByVal public Status IsDirectory(@StdString BytePointer fname)
@ByVal public Status IsDirectory(@StdString String fname)
@ByVal public Status GetFileSize(@StdString BytePointer fname, @Cast(value="tensorflow::uint64*") LongPointer file_size)
fname
in *file_size
.@ByVal public Status GetFileSize(@StdString String fname, @Cast(value="tensorflow::uint64*") LongBuffer file_size)
@ByVal public Status GetFileSize(@StdString BytePointer fname, @Cast(value="tensorflow::uint64*") long... file_size)
@ByVal public Status GetFileSize(@StdString String fname, @Cast(value="tensorflow::uint64*") LongPointer file_size)
@ByVal public Status GetFileSize(@StdString BytePointer fname, @Cast(value="tensorflow::uint64*") LongBuffer file_size)
@ByVal public Status GetFileSize(@StdString String fname, @Cast(value="tensorflow::uint64*") long... file_size)
@ByVal public Status RenameFile(@StdString BytePointer src, @StdString BytePointer target)
@ByVal public Status RenameFile(@StdString String src, @StdString String target)
@ByVal public Status CopyFile(@StdString BytePointer src, @StdString BytePointer target)
@ByVal public Status CopyFile(@StdString String src, @StdString String target)
@StdString public BytePointer GetExecutablePath()
@Cast(value="bool") public boolean LocalTempFilename(@StdString @Cast(value={"char*","std::string*"}) BytePointer filename)
@Cast(value="bool") public boolean CreateUniqueFileName(@StdString @Cast(value={"char*","std::string*"}) BytePointer prefix, @StdString BytePointer suffix)
@Cast(value="bool") public boolean CreateUniqueFileName(@StdString @Cast(value={"char*","std::string*"}) BytePointer prefix, @StdString String suffix)
@StdString public BytePointer GetRunfilesDir()
@Cast(value="tensorflow::uint64") public long NowNanos()
@Cast(value="tensorflow::uint64") public long NowMicros()
@Cast(value="tensorflow::uint64") public long NowSeconds()
public void SleepForMicroseconds(@Cast(value="tensorflow::int64") long micros)
public Thread StartThread(@Const @ByRef ThreadOptions thread_options, @StdString BytePointer name, @ByVal tensorflow.Fn fn)
public Thread StartThread(@Const @ByRef ThreadOptions thread_options, @StdString String name, @ByVal tensorflow.Fn fn)
public int GetCurrentThreadId()
@Cast(value="bool") public boolean GetCurrentThreadName(@StdString @Cast(value={"char*","std::string*"}) BytePointer name)
public void SchedClosure(@ByVal tensorflow.Fn closure)
public void SchedClosureAfter(@Cast(value="tensorflow::int64") long micros, @ByVal tensorflow.Fn closure)
@ByVal public Status LoadLibrary(@Cast(value="const char*") BytePointer library_filename, @Cast(value="void**") PointerPointer handle)
@ByVal public Status LoadLibrary(@Cast(value="const char*") BytePointer library_filename, @Cast(value="void**") @ByPtrPtr Pointer handle)
@ByVal public Status LoadLibrary(String library_filename, @Cast(value="void**") @ByPtrPtr Pointer handle)
@ByVal public Status GetSymbolFromLibrary(Pointer handle, @Cast(value="const char*") BytePointer symbol_name, @Cast(value="void**") PointerPointer symbol)
@ByVal public Status GetSymbolFromLibrary(Pointer handle, @Cast(value="const char*") BytePointer symbol_name, @Cast(value="void**") @ByPtrPtr Pointer symbol)
@ByVal public Status GetSymbolFromLibrary(Pointer handle, String symbol_name, @Cast(value="void**") @ByPtrPtr Pointer symbol)
@StdString public BytePointer FormatLibraryFileName(@StdString BytePointer name, @StdString BytePointer version)
@StdString public String FormatLibraryFileName(@StdString String name, @StdString String version)
public void GetLocalTempDirectories(StringVector list)
Copyright © 2022. All rights reserved.