storage

How to find the amount of free storage (disk space) left on Android?

ぃ、小莉子 提交于 2019-11-27 12:04:33
I am trying to figure out the available disk space on the Android phone running my application. Is there a way to do this programmatically? Thanks, Try StatFs.getAvailableBlocks . You'll need to convert the block count to KB with getBlockSize. Example: Getting human readable size like 1 Gb String memory = bytesToHuman(totalMemory()) /************************************************************************************************* Returns size in bytes. If you need calculate external memory, change this: StatFs statFs = new StatFs(Environment.getRootDirectory().getAbsolutePath()); to this:

Does Microsoft SkyDrive have an API? [closed]

纵然是瞬间 提交于 2019-11-27 12:03:14
So with the recent news that Microsoft Skydrive is going to get bumped to 25GB of storage per account, does anyone know if SkyDrive has an API? (And if so, where are the docs?) Dare Obasanjo SkyDrive (renamed 'OneDrive') has an official API. Details can be found by going to The OneDrive Developer center . You can also find code samples for working with the OneDrive API, along with source code for the SDKs, on GitHub 来源: https://stackoverflow.com/questions/307696/does-microsoft-skydrive-have-an-api

Query Available iOS Disk Space with Swift

橙三吉。 提交于 2019-11-27 11:57:36
I'm trying to get the available iOS device storage using Swift . I found this function here func deviceRemainingFreeSpaceInBytes() -> NSNumber { let documentDirectoryPath = NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true) let systemAttributes = NSFileManager.defaultManager().attributesOfFileSystemForPath(documentDirectoryPath.last as String, error: nil) return systemAttributes[NSFileSystemFreeSize] as NSNumber } But at compile time this error is given: [NSObject : AnyObject]? does not have a member named 'subscript' I believe this error arises from the issue

MongoDB as file storage

旧城冷巷雨未停 提交于 2019-11-27 11:48:36
问题 i'm trying to find the best solution to create scalable storage for big files. File size can vary from 1-2 megabytes and up to 500-600 gigabytes. I have found some information about Hadoop and it's HDFS, but it looks a little bit complicated, because i don't need any Map/Reduce jobs and many other features. Now i'm thinking to use MongoDB and it's GridFS as file storage solution. And now the questions: What will happen with gridfs when i try to write few files concurrently. Will there be any

Android memory types (RAM v Internal Memory)

久未见 提交于 2019-11-27 11:47:52
问题 On a separate thread I demonstrated my ignorance of memory types by asking about the best way to copy a file into "internal memory" and was advised that this was not a good idea and that it would be better to read the file into "RAM". I am now trying to understand how these two types of memory are related and how they can be used. I understand that "internal memory is perceived to be the flash that is used to store APKs, ROM images, etc." The specification for my HTC Hero says that there is

How to Get True Size of MySQL Database?

ε祈祈猫儿з 提交于 2019-11-27 10:03:22
I would like to know how much space does my MySQL database use, in order to select a web host. I found the command SHOW TABLE STATUS LIKE 'table_name' so when I do the query, I get something like this: Name | Rows | Avg. Row Length | Data_Length | Index Length ---------- ---- --------------- ----------- ------------ table_name 400 55 362000 66560 numbers are rounded. So do I have 362000 or 400*362000 = 144800000 bytes of data for this table? And what does Index Length mean? Thanks ! ron_dobley From S. Prakash, found at the MySQL forum : SELECT table_schema "database name", sum( data_length +

C#: Create a virtual drive in Computer

一世执手 提交于 2019-11-27 09:51:22
问题 Is there any way to create a virtual drive in "(My) Computer" and manipulate it, somewhat like JungleDisk does it? It probably does something like: override OnRead(object sender, Event e) { ShowFilesFromAmazon(); } Are there any API:s for this? Maybe to write to an XML-file or a database, instead of a real drive. The Dokan Library seems to be the answer that mostly corresponds with my question, even though System.IO.IsolatedStorage seems to be the most standardized and most Microsoft

Read video stored on android native storage in my Ionic app

*爱你&永不变心* 提交于 2019-11-27 09:50:35
I am developing ionic 3 app that download videos from server to the device's native storage . i used this URL to save file: let externalDir = this.file.externalDataDirectory; file download is fine it is downloaded and i can view it from the device. for more details the file link in the storage is: /storage/emulated/0/Android/data/xxxxxxxx/files/VideoTest1/0.mp4 but the problem is i want to play that downloaded video into my app using <video> tag, i used the same link to view it but it doesn't work. any help? sorry for my english I've been searching for a solution. I resolve this issue as

My iphone App got rejected with this reason “We found that your app does not follow the iOS Data Storage Guidelines,…”

一曲冷凌霜 提交于 2019-11-27 09:41:49
问题 My iphone app has got rejected recently & with below mentioned reason : "We found that your app does not follow the iOS Data Storage Guidelines, which is not in compliance with the App Store Review Guidelines." For this app I was storing database (sqlite file) in /Documents/ directory for iOS 5.0.1 & above & for iOS 5.0 & below versions I used Library/Cache directory. For other data like PDF & artwork images which I was downloading from server I followed the same approach as above like: iOS 5

SQLite or SharedPreferences for persistent data storage?

寵の児 提交于 2019-11-27 09:27:22
For persistent storage of data is there any distinct advantage of using a SQLlite database over SharedPreferences or vice versa? Currently my application data is only a couple of kilobytes in size, though it could conceivably rise to ten times that size in the future. I can't find anywhere that states how much storage is available using SharedPreferences but would imagine this would be one limitation of using it? Is there any difference in speed between the two methods? I'm looking to weigh up the pros and cons of those two storage methods. Off the top of my head: SharedPreferences: Pro: