26bool File::copyInternal (
const File& dest)
const
28 FileInputStream in (*
this);
30 if (dest.deleteFile())
33 FileOutputStream out (dest);
35 if (out.failedToOpen())
38 if (out.writeFromInputStream (in, -1) ==
getSize())
65 constexpr int bufferSize = 8194;
88 bool*
const isDir,
bool*
const isHidden,
int64*
const fileSize,
89 Time*
const modTime,
Time*
const creationTime,
bool*
const isReadOnly)
111 if (isHidden !=
nullptr)
123 String parentDir, wildCard;
130 : pimpl (new DirectoryIterator::NativeIterator::
Pimpl (directory,
wildCardStr))
134DirectoryIterator::NativeIterator::~NativeIterator() {}
137 bool* isDir,
bool* isHidden,
int64* fileSize,
138 Time* modTime,
Time* creationTime,
bool* isReadOnly)
140 return pimpl->next (
filenameFound, isDir, isHidden, fileSize, modTime, creationTime, isReadOnly);
Holds a resizable array of primitive or copy-by-value objects.
Wraps a pointer to a null-terminated UTF-8 character string, and provides various methods to operate ...
Represents a local file or directory.
bool isSymbolicLink() const
Returns true if this file is a link or alias that can be followed using getLinkedTarget().
bool isHidden() const
Returns true if this file is a hidden or system file.
static String addTrailingSeparator(const String &path)
Adds a separator character to the end of a path if it doesn't already have one.
int64 getSize() const
Returns the size of the file in bytes.
const String & getFullPathName() const noexcept
Returns the complete, absolute path of this file.
String getFileName() const
Returns the last section of the pathname.
static void findFileSystemRoots(Array< File > &results)
Creates a set of files to represent each file root.
String getNativeLinkedTarget() const
This returns the native path that the symbolic link points to.
Very simple container class to hold a pointer to some data on the heap.
const char * toRawUTF8() const
Returns a pointer to a UTF-8 version of this string.
bool startsWithChar(juce_wchar character) const noexcept
Tests whether the string begins with a particular character.
static String fromUTF8(const char *utf8buffer, int bufferSizeBytes=-1)
Creates a String from a UTF-8 encoded buffer.
CharPointer_UTF8 toUTF8() const
Returns a pointer to a UTF-8 version of this string.
bool isNotEmpty() const noexcept
Returns true if the string contains at least one character.
Holds an absolute date and time.
constexpr Type jmax(Type a, Type b)
Returns the larger of two values.
Type unalignedPointerCast(void *ptr) noexcept
Casts a pointer to another type via void*, which suppresses the cast-align warning which sometimes ar...
long long int64
A platform-independent 64-bit integer type.